import { _decorator, Component, Node, EventHandler } from 'cc';
import { BaseView } from '../../base/BaseView';
import { ScrollList } from '../../comp/ScrollList';
import { ScrollListCell } from '../../comp/ScrollListCell';
import { ItemRender } from './ItemRender';
const { ccclass, property } = _decorator;

@ccclass('ItemListView')
export class ItemListView extends BaseView {
    @property(ScrollList)
    itemList:ScrollList<any>;

    onLoad(){
        // this.itemList.renderCallback = this.onListRender.bind(this);
    }
    protected onOpen(): void {
        this.itemList.list = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16];
        // throw new Error('Method not implemented.');
    }
    protected offListeners(): void {
        throw new Error('Method not implemented.');
    }
    protected onClose(): void {
        throw new Error('Method not implemented.');
    }

    // onListRender(cell:ItemRender):void{
        // console.log(cell);
        // let itemRender = cell.getComponent(ItemRender);
        // cell.setData(cell.data);
    // }
}

